package com.richpencil.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.filter.HttpPutFormContentFilter;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**
 * @Classname WebMvcConfig
 * @Description TODO
 * @Date 2020/7/30 11:01
 * @Created by Administrator
 */
@Configuration
@EnableWebMvc
public class WebMvcConfig extends WebMvcConfigurerAdapter {
    // 就是这个
    @Bean
    public HttpPutFormContentFilter httpPutFormContentFilter() {
        return new HttpPutFormContentFilter();
    }

}


/*//或者使用：@Component，其实原理都是一样，就是开启：HttpPutFormContentFilter
@Component
class PutFilter extends HttpPutFormContentFilter {
}*/

